package com.gz.controller;

import com.gz.common.CentsService;
import com.gz.utils.Response;
import com.jfinal.core.Controller;

public class CentsController extends Controller{


/**
 * @param uid 购买商品的用户id
 * @param money 参与分润的金额
 * @URL http://localhost:8080/cms-api/cent/updateCents
 */
	public void updateCents() {
		Integer uid=getParaToInt("uid");
		Integer money=getParaToInt("money");
		int result=CentsService.getCentsService().fenqian(uid,money);
		renderJson(Response.responseJson(result+1000, result>0?"更新积分成功":"更新积分失败！"));
	}
}
